package com.odin.backgrounddownload;

import java.io.Serializable;

public class DownloadParam implements Serializable {
    private static final String k_TmpExt = ".tmp";
    private String urlRelativePath;
    private String saveRelativePath;
    private long fileSize;
    private long finishSize;

    // 构造函数
    public DownloadParam(String url, String fileName, long fileSize) {
        this.urlRelativePath = url;
        this.saveRelativePath = fileName;
        this.fileSize = fileSize;
    }

    // Getter 和 Setter 方法
    public String getUrlRelativePath() {
        return urlRelativePath;
    }

    public void setUrlRelativePath(String urlRelativePath) {
        this.urlRelativePath = urlRelativePath;
    }

    public String getSaveRelativePath() {
        return saveRelativePath;
    }

    public void setSaveRelativePath(String saveRelativePath) {
        this.saveRelativePath = saveRelativePath;
    }

    public String getTmpSaveRelativePath()
    {
        return saveRelativePath + k_TmpExt;
    }

    public long getFileSize() {
        return fileSize;
    }

    public void setFileSize(long fileSize) {
        this.fileSize = fileSize;
    }

    public long getFinishSize() {
        return finishSize;
    }

    public void setFinishSize(long finishSize) {
        this.finishSize = finishSize;
    }
}
